﻿using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK.IService
{
    public interface IDictTypeService
    {
        /// <summary>
        /// 添加字典类型
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool AddDictType(DictType m);
        /// <summary>
        /// 获取字典列表
        /// </summary>
        /// <param name="keyword"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<DictType> GetAllDictTypeList(string? keyword, int pageIndex, int pageSize, out int totalCount);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="dictType"></param>
        /// <returns></returns>
        bool UpdDicType(DictType dictType);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DelDicType(long id);
        /// <summary>
        /// 根据主键获取对象
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        DictType? GetDictTypeByID(long id);

        /// <summary>
        /// 字典项左侧树形
        /// </summary>
        /// <param name="keyword"></param>
        /// <param name="isTree"></param>
        /// <returns></returns>
        List<DictType> GetAllDictTypeTree(string? keyword, bool isTree);
    }
}
